/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.strategy.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 策略开关-合约
 *
 * @since 2022-11-24 10:39:27
 */
@Data
@TableName("strategy_switch_contract")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "策略开关-合约")
public class StrategySwitchContract extends Model<StrategySwitchContract> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 平台id
     */
    @ApiModelProperty(value = "平台id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long platformId;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 策略id
     */
    @ApiModelProperty(value = "策略id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long strategyId;

    /**
     * 利润
     */
    @ApiModelProperty(value = "利润")
    @JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
    private BigDecimal profit;

    /**
     * 净利润（USDT）
     */
    @ApiModelProperty(value = "净利润（USDT）")
    @JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
    private BigDecimal netProfit;

    /**
     * 消耗燃油费
     */
    @ApiModelProperty(value = "消耗燃油费")
    @JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
    private BigDecimal fuelCost;

    /**
     * 异常结算利润（USDT）
     */
    @ApiModelProperty(value = "异常结算利润（USDT）")
    @JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
    private BigDecimal errorSettlementProfit;

    /**
     * 任务计数
     */
    @ApiModelProperty(value = "任务计数")
    private Integer taskCount;

    /**
     * 是否发送过燃油币余额提醒邮件（0否、1是）
     */
    @ApiModelProperty(value = "是否发送过燃油币余额提醒邮件（0否、1是）")
    private String sendFuelReminder;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long createBy;

    /**
     * 创建人名称
     */
    @ApiModelProperty(value = "创建人名称")
    private String createName;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    /**
     * 修改人id
     */
    @ApiModelProperty(value = "修改人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long updateBy;

    /**
     * 修改人名称
     */
    @ApiModelProperty(value = "修改人名称")
    private String updateName;

    /**
     * 状态（0暂停、1运行中、2已结束、3关闭、4异常）
     */
    @ApiModelProperty(value = "状态（0暂停、1运行中、2已结束、3关闭、4异常）")
    private String status;

    /**
     * 是否删除（0否、null是）
     */
    @TableLogic
    @ApiModelProperty(value = "是否删除（0否、null是）")
    private String isDeleted;

}
